<?php

namespace app\api\model;

use app\common\library\Auth;
use app\common\model\User as U;

class User extends U
{
    // 开启自动写入时间戳字段
    protected $autoWriteTimestamp = 'int';
    // 定义时间戳字段名
    protected $createTime = 'createtime';
    protected $updateTime = 'updatetime';

    public static function info()
    {
        if (Auth::instance()->isLogin()) {
            return Auth::instance();
        }
        return null;
    }

    public static function money($money, $user_id, $type, $memo,$num= null)
    {
        parent::money($money, $user_id, $type, $memo,$num =null); // TODO: Change the autogenerated stub
    }

    public static function score($score, $user_id, $type, $memo, $id, $data = null)
    {
        parent::score($score, $user_id, $type, $memo, $id, $data); // TODO: Change the autogenerated stub
    }
}